package com.jhhc.StormSurgeForecast.StormSurge.Dao;

import com.jhhc.RHDB.Data.Pojo.ST_TIDE_R;
import com.jhhc.StormSurgeForecast.AstronomicalTide.Pojo.BDMS_ST_ASTROTD_F;
import com.jhhc.StormSurgeForecast.AstronomicalTide.Pojo.DataBO.AstronomictTideTime;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BDMS_ST_ASTROTD_FMapper {

    List<BDMS_ST_ASTROTD_F> selectAll();


    //报表
    List<BDMS_ST_ASTROTD_F> selectTide(@Param("stationCode") String StationCode, @Param("startTime") String StartTime,
                                       @Param("endTime") String EndTime, int departmentId);
    List<BDMS_ST_ASTROTD_F> selectByOnwFtdz(@Param("stationCodes") List<String> StationCodes, @Param("startTime") String StartTime,
                                       @Param("endTime") String EndTime, int departmentId);

    //增水值
    List<BDMS_ST_ASTROTD_F> selectFTDZ(@Param("stationCodes") List<String> StationCodes, @Param("startTime") String StartTime,
                                       @Param("endTime") String EndTime, int departmentId);


    List<BDMS_ST_ASTROTD_F> selectNewOne(@Param("stcd") String stcd);
    List<BDMS_ST_ASTROTD_F> selectNewEstData(@Param("stcd") List<String> stcd);

    int insertBatch(List<BDMS_ST_ASTROTD_F> entities);
    int insertBatchSqlServer(List<BDMS_ST_ASTROTD_F> entities);

    int delete(@Param("year") int year, @Param("stationCodes") List<String> stationCodes);

    List<String> getDepartments();


    List<BDMS_ST_ASTROTD_F> getHourlyTwcTide(@Param("startTime")String startTime,@Param("endTime")String endTime,
                                             @Param("stationCodes") List<String> stationCodes,
                                             @Param("departmentId") String departmentId,
                                             @Param("getHLTide") boolean getHLTide);

    AstronomictTideTime selectMaxAndMinTime(@Param("stationCode") String stationCode);


    List<BDMS_ST_ASTROTD_F> getHLTwcTide(@Param("startTime")String startTime,@Param("endTime")String endTime,
                                         @Param("stationCodes") List<String> stationCodes,
                                         @Param("departmentId") String departmentId);


    List<BDMS_ST_ASTROTD_F> getTwcTideByYear(@Param("year")String year,
                                         @Param("stationCodes") List<String> stationCodes,
                                         @Param("departmentId") String departmentId);

    /**
     *智能模型bdms_st_astrotd_f.txt文件所需数据
     */
    List<BDMS_ST_ASTROTD_F> tide_output(@Param("startTime") String startTime,
                                        @Param("endTime") String endTime);
    int deleteByStationCode(@Param("start") String start,@Param("end") String end,
                            @Param("stationCode") String stationCode);

    int deleteWz(@Param("startTime") String startTime, @Param("endTime") String endTime,
                 @Param("stationCodes") List<String> stationCodes);
}